#include "VertexTemplate.h"

VertexTemplate::VertexTemplate(){
    totalSize=0;
}

void VertexTemplate::AddAttribute(int size, string name, GLuint id){
    attributes.push_back(new AttributeTemplate(size, name, id));
    attributes.at(attributes.size()-1)->offset=totalSize;
    totalSize+=size;
}

void VertexTemplate::AddAttribute(int size, string name){
    AttributeTemplate* temp =new AttributeTemplate(size, name);
    attributes.push_back(temp);
    attributes.at(attributes.size()-1)->offset=totalSize;
    totalSize+=size;
}
